package com.data.dao;

import java.util.List;

import com.base.dao.TemplateDao;
import com.data.entity.ChargeWeek;

public interface ChargeWeekDao extends TemplateDao<ChargeWeek, Integer>{
	/**
	 * 根据年份和所属周查询电费周记录
	 * @param id  生产线或者设备id
	 * @param belongYear
	 * @param belongWeek
	 * @param chargeName
	 *  @param isLine
	 * @return
	 */
	ChargeWeek getChargeWeekByDate(int id,int belongYear,int belongWeek,String chargeName,String isLine);

	/**
	 * 获取时间区间内的所有chargeName
	 * @param belongYear
	 * @param startWeek
	 * @param endWeek
	 * @return
	 */
	List<ChargeWeek> getDistinctChargeName(int belongYear,int startWeek,int endWeek);
	
	/**
	 * 根据类型，时间，equid找到累计的电度电费
	 * @param id生产线或者设备id
	 * @param belongYear
	 * @param startWeek
	 * @param endWeek
	 * @param chargeName
	 * @return
	 */
	ChargeWeek getDurationByChargeNameAndDate(int id,int belongYear,int startWeek,int endWeek,String chargeName,String isLine);
	
	/**
	 * 根据周区间找到的各自使用电费
	 * @param id生产线或者设备id
	 * @param belongYear
	 * @param startWeek
	 * @param endWeek
	 * @param chargeName
	 * @return
	 */
	List<ChargeWeek> getChargeByDates(int id,int belongYear,int startWeek,int endWeek,String chargeName,String isLine);
	
	/**
	 * 根据belongWeek找到该周使用的总电度
	 * @param id生产线或者设备id
	 * @param belongYear
	 * @param belongWeek
	 * @return
	 */
	ChargeWeek getCompByDate(int id,int belongYear,int belongWeek,String isLine);
	
}
